package com.sigmatrix.h5.service.rebate.demo.a;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 返利配置类demo
 *
 */
@Configuration
public class AConfiguration {

	@Bean("demoARebateHandler")
	public ARebateHandler aRebateHandler() {
		ARebateHandler handler = new ARebateHandler();
		handler.addColletor(aDealerCollector());
		handler.addInterceptor(aRebateIntercept());
		handler.addChooser(aObjectChoose());
		handler.addAction(aRebateAction());;
		return handler;
	}
	
	@Bean
	public ADealerCollector aDealerCollector() {
		ADealerCollector collector = new ADealerCollector();
		return collector;
	}
	
	@Bean
	public ARebateIntercept aRebateIntercept() {
		ARebateIntercept intercept = new ARebateIntercept();
		return intercept;
	}

	@Bean
	public AObjectChoose aObjectChoose() {
		AObjectChoose chooser = new AObjectChoose();
		return chooser;
	}
	
	@Bean
	public ARebateAction aRebateAction() {
		ARebateAction action = new ARebateAction();
		return action;
	}
	
	

}
